var configForm = document.forms.configForm;

$.post(
  "admin/config.let",
  {"configKey":configForm.configKey.value,"action":"get"},
  function(data){
    for(let name in data){
      if(configForm[name]!=undefined){
        configForm[name].value=data[name];
      }
    }
  },"json"

);

configForm.onsubmit = function(){
  $.post(
    "admin/config.let",
    sys.form.param(configForm).toString(),
    function(data){
    	if(data.code==200){
    		sys.toastr.success("更新配置成功");
    	}else{
    		sys.toastr.error(data.message);
    	}
    },"json"
  );
  
  return false;
}